package com.freesky.web.manager.remote.panel;

import com.freesky.common.dao.entity.HomeNav;
import com.freesky.common.pojo.DataTablesResult;
import com.freesky.common.utils.reponse.JSONResponse;
import com.freesky.common.vo.VOPanelContent;
import com.freesky.web.manager.remote.panel.fallback.HomeNavigationRemoteFallback;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(name = "emall-provider-zuul", fallback = HomeNavigationRemoteFallback.class)
public interface HomeNavigationRemote {
    String ZUUL_URL_PREFIX = "/mysevice/content";

    @GetMapping(value = ZUUL_URL_PREFIX  + "/home/nav/list")
    DataTablesResult list();

    @DeleteMapping(value = ZUUL_URL_PREFIX  + "/home/nav/del/{ids}")
    JSONResponse delete(@PathVariable(value = "ids") int[] ids);

    @PostMapping(value = ZUUL_URL_PREFIX  + "/home/nav/add")
    JSONResponse add(@RequestBody HomeNav homeNav);

    @PostMapping(value = ZUUL_URL_PREFIX  + "/home/nav/update")
    JSONResponse update(@RequestBody HomeNav homeNav);
}
